import request from '@/utils/request'
// 查询巡检点列表
export function listPatrolPoint(query) {
  return request({
    url: '/robot/patrolpoint/list',
    method: 'get',
    params: query
  })
}
// 查询巡检点详细
export function getPatrolPoint(id) {
  return request({
    url: '/robot/patrolpoint/' + id,
    method: 'get'
  })
}
//根据机器人id查询巡检点列表
export function listPointsByRobotId(id) {
  return request({
    url: '/robot/patrolpoint/points/' + id,
    method: 'get'
  })
}
// 新增巡检点
export function addPatrolPoint(data) {
  return request({
    url: '/robot/patrolpoint',
    method: 'post',
    data: data
  })
}
// 修改巡检点
export function updatePatrolPoint(data) {
  return request({
    url: '/robot/patrolpoint',
    method: 'put',
    data: data
  })
}
// 修改巡检点编号
export function updatePatrolPointNum(data) {
  return request({
    url: '/robot/patrolpoint/patrolpointnum',
    method: 'put',
    data: data
  })
}
// 删除巡检点
export function delPatrolPoint(id) {
  return request({
    url: '/robot/patrolpoint/' + id,
    method: 'delete'
  })
}
